﻿using System;
using System.Net;

namespace CdpClient
{
    class Program
    {
        static void Main(string[] args)
        {
            Cdp.CdpClient client = new Cdp.CdpClient(1024);
            client.OnConnected += Client_OnConnected;
            client.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 6000));
            if(client.IsConnected())
            {

            }
            Console.ReadLine();
        }

        private static void Client_OnConnected(object sender, Cdp.CdpDatagram data)
        {
            Cdp.Logger.Information("connected to {0}", data.RemoteEndPoint);
        }
    }
}